package com.ideheima.zuoye.zuoye2;

import cn.hutool.core.util.ObjectUtil;

import java.util.Objects;

public class Test {
    public static void main(String[] args) {
        Cat cat = new Cat("小黑", 1, "公");
        Cat cat1 = new Cat("小黄", 2, "母");
        if (ObjectUtil.equals(cat, cat1)){
            System.out.println("相同");
        }else {
            System.out.println("不相同");
        }
        System.out.println("=============");
        if (Objects.equals(cat, cat1)){
            System.out.println("相同");
        }
        else {
            System.out.println("不相同");
        }
    }
}
